package com.company.heap;

import java.util.PriorityQueue;
import java.util.Random;

/**
 * Created by v on 16-12-10.
 */
public class Main {
    public static void main(String[] args) {
        BinomialQueue<Integer> queue=new BinomialQueue<>();
        PriorityQueue queue1=new PriorityQueue();

        Random random=new Random(2);

        long addTime=0;
        long removeTime=0;

        for(int i=0;i<200;i++){
            long time=System.currentTimeMillis();
            for(int j=0;j<100000;j++){
                queue.add(random.nextInt(100000));
            }
            addTime+=System.currentTimeMillis()-time;
            time=System.currentTimeMillis();

            for(int j=0;j<100000;j++){
                queue.poll();
            }
            removeTime+=System.currentTimeMillis()-time;
        }

        System.out.println(addTime);
        System.out.println(removeTime);
    }
}
